# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=pcsc-cyberjack
pkgver=3.99.5_p15
_pkgver=${pkgver/_p/_SP}
_filever=${_pkgver%_SP*}final.${_pkgver#*_}
pkgrel=0
pkgdesc="PCSC driver for Reiner SCT cyberjack card reader"
url="http://www.reiner-sct.com/"
arch="all"
license="GPL-2.0-only"
depends="pcsc-lite"
makedepends="autoconf automake libtool pcsc-lite-dev libusb-dev"
options="!check"
source="pcsc-cyberjack_$_filever.tar.bz2::http://support.reiner-sct.de/downloads/LINUX/V$_pkgver/pcsc-cyberjack_$_filever.tar.bz2"
builddir="$srcdir/$pkgname-$_filever"

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	./configure \
		--prefix=/usr \
		--disable-static \
		--mandir=/usr/share/man/man8 \
		--sysconfdir=/etc/"$pkgname"  \
		--enable-udev \
		--with-usbdropdir="$(pkg-config libpcsclite --variable=usbdropdir)"
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
d1a5454aea96866581f48a240b96013bd0c313965a8ef7a384ac41a929f3e805ad13590c383dab7638134c730e6f26e6cd1492d533f4910aad7c515016452258  pcsc-cyberjack_3.99.5final.SP15.tar.bz2
"
